package mylibrary.collection;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Set;

public class Test {

	public static void main(String[] args) throws InterruptedException {
		
		List list = new ArrayList();
		
		list.add("1");
		list.add("2");
		list.add(new Integer(100));
		

		Iterator it = list.iterator();
		ListIterator i = list.listIterator();
		
//		i.next();
//		i.next();
//		i.add("3");
		
		//System.out.println(i.previousIndex());
		//System.out.println(i.nextIndex());	
		i.next();
		i.remove();
		//System.out.println(i.next());
		
		for(int j=0; j<list.size(); j++) {
			
			System.out.println(list.get(j));
		}
	
		System.out.println("------------");
		Thread.sleep(5000);
		
		Map tb = new Hashtable();
		tb.put("22", null);
		
		Map tb1 = new HashMap();
		
	}
}
